<template>
    <div>
      <h1>{{name}}</h1>
      <button @click="change">点击</button>
    </div>
  </template>
  
  <script>
  export default {
    data(){
        return{
            name:'振涛',
        }
    },
    methods:{
        change(){
                alert(this.name)
            }
    }
  }
  </script>
  
  <!-- Add "scoped" attribute to limit CSS to this component only -->
  <style scoped>
  
  </style>
  